package com.neusoft.yuejian_6.service;

import com.neusoft.yuejian_6.javabean.Activity;
import com.neusoft.yuejian_6.javabean.Apply;
import com.neusoft.yuejian_6.javabean.Inform;
import com.neusoft.yuejian_6.javabean.Order;
import com.neusoft.yuejian_6.javabean.Post;
import com.neusoft.yuejian_6.javabean.Prize;
import com.neusoft.yuejian_6.javabean.User;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * Created by Q on 2017/10/10.
 */

public interface UserService {

        //登录
        @GET("User/getUserLogin")
        Call<User> getUserLogin(@Query("user_name") String editTextUser,
                                @Query("user_password") String editTextPass);

        //注册
        @GET("User/getUserRegister")
        Call<User> getuserRegister(@Query("user_name") String username,
                                      @Query("user_password") String password,
                                      @Query("user_phone") String userphone,
                                      @Query("user_age") String userage,
                                      @Query("user_sex") String usersex);
        @GET("User/getUserInfo")
        Call<User> getUserInfo(@Query("user_id") int user_id
        );
        @GET("User/edituser")
        Call<User> edituser(@Query("user_id") int user_id
        );

        @GET("User/updateuser")
        Call<User> updateuser(@Query("user_id") int user_id,
                              @Query("user_name") String user_name,
                              @Query("user_password") String user_password,
                              @Query("user_phone") String user_phone

        );

        @GET("User/getpostlist")
        Call<List<Post>> getpostlist(@Query("user_id") int user_id
        );

        @GET("User/getprizelist")
        Call<List<Prize>> getprizelist(@Query("user_id") int user_id
        );

        @GET("User/getorderlist")
        Call<List<Order>> getorderlist(@Query("user_id") int user_id
        );

        @GET("User/getinformlist")
        Call<List<Inform>> getinformlist(@Query("user_id") int user_id
        );



        @GET("getPrizeById.do")
        Call<Prize> getPrizeById(
                @Query("user_id") int user_id

        );

        //我关注的act列表
        @GET("User/getMyCollectActivity")
        Call<List<Activity>> getMyCollectActivity(@Query("user_id") int user_id,
                                                  @Query("flag") String flag);
}


